<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IBustAttribute</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="IBust Reference Manual">
<link rel="up" href="ch02.html" title="Panel (User Interfaces)">
<link rel="prev" href="ch02.html" title="Panel (User Interfaces)">
<link rel="next" href="IBustAttrList.html" title="IBustAttrList">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ch02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">IBust Reference Manual</th>
<td><a accesskey="n" href="IBustAttrList.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#IBustAttribute.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#IBustAttribute.description" class="shortcut">Description</a>
                   | 
                  <a href="#IBustAttribute.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="IBustAttribute"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="IBustAttribute.top_of_page"></a>IBustAttribute</span></h2>
<p>IBustAttribute — Attributes of IBustText.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="IBustAttribute.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="IBustAttribute.synopsis"></a><h2>Synopsis</h2>
<a name="IBustAttrType"></a><a name="IBustAttrUnderline"></a><pre class="synopsis">enum                <a class="link" href="IBustAttribute.html#IBustAttrType-enum" title="enum IBustAttrType">IBustAttrType</a>;
enum                <a class="link" href="IBustAttribute.html#IBustAttrUnderline-enum" title="enum IBustAttrUnderline">IBustAttrUnderline</a>;
struct              <a class="link" href="IBustAttribute.html#IBustAttribute-struct" title="struct IBustAttribute">IBustAttribute</a>;
struct              <a class="link" href="IBustAttribute.html#IBustAttributeClass" title="struct IBustAttributeClass">IBustAttributeClass</a>;
<a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     <a class="link" href="IBustAttribute.html#ibust-attr-background-new" title="ibust_attr_background_new ()">ibust_attr_background_new</a>            (<em class="parameter"><code><span class="type">guint</span> color</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);
<a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     <a class="link" href="IBustAttribute.html#ibust-attr-foreground-new" title="ibust_attr_foreground_new ()">ibust_attr_foreground_new</a>            (<em class="parameter"><code><span class="type">guint</span> color</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);
<a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     <a class="link" href="IBustAttribute.html#ibust-attr-underline-new" title="ibust_attr_underline_new ()">ibust_attr_underline_new</a>             (<em class="parameter"><code><span class="type">guint</span> underline_type</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="IBustAttribute.html#ibust-attribute-get-attr-type" title="ibust_attribute_get_attr_type ()">ibust_attribute_get_attr_type</a>        (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="IBustAttribute.html#ibust-attribute-get-end-index" title="ibust_attribute_get_end_index ()">ibust_attribute_get_end_index</a>        (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="IBustAttribute.html#ibust-attribute-get-start-index" title="ibust_attribute_get_start_index ()">ibust_attribute_get_start_index</a>      (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);
<span class="returnvalue">guint</span>               <a class="link" href="IBustAttribute.html#ibust-attribute-get-value" title="ibust_attribute_get_value ()">ibust_attribute_get_value</a>            (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);
<a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     <a class="link" href="IBustAttribute.html#ibust-attribute-new" title="ibust_attribute_new ()">ibust_attribute_new</a>                  (<em class="parameter"><code><span class="type">guint</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> value</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="IBustAttribute.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GEnum
   +----IBustAttrType
</pre>
<pre class="synopsis">
  GEnum
   +----IBustAttrUnderline
</pre>
<pre class="synopsis">
  GObject
   +----GInitiallyUnowned
         +----<a class="link" href="IBustObject.html" title="IBustObject">IBustObject</a>
               +----<a class="link" href="IBustSerializable.html" title="IBustSerializable">IBustSerializable</a>
                     +----IBustAttribute
</pre>
</div>
<div class="refsect1">
<a name="IBustAttribute.description"></a><h2>Description</h2>
<p>
An IBustAttribute represents an attribute that associate to IBustText.
It decorates preedit buffer and auxiliary text with underline, foreground and background colors.
</p>
</div>
<div class="refsect1">
<a name="IBustAttribute.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="IBustAttrType-enum"></a><h3>enum IBustAttrType</h3>
<pre class="programlisting">typedef enum {
    IBUST_ATTR_TYPE_UNDERLINE    = 1,
    IBUST_ATTR_TYPE_FOREGROUND   = 2,
    IBUST_ATTR_TYPE_BACKGROUND   = 3,
} IBustAttrType;
</pre>
<p>
Type enumeration of IBustText attribute.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="IBUST-ATTR-TYPE-UNDERLINE:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_TYPE_UNDERLINE</code></span></p></td>
<td>Decorate with underline.
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-TYPE-FOREGROUND:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_TYPE_FOREGROUND</code></span></p></td>
<td>Foreground color.
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-TYPE-BACKGROUND:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_TYPE_BACKGROUND</code></span></p></td>
<td>Background color.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IBustAttrUnderline-enum"></a><h3>enum IBustAttrUnderline</h3>
<pre class="programlisting">typedef enum {
    IBUST_ATTR_UNDERLINE_NONE    = 0,
    IBUST_ATTR_UNDERLINE_SINGLE  = 1,
    IBUST_ATTR_UNDERLINE_DOUBLE  = 2,
    IBUST_ATTR_UNDERLINE_LOW     = 3,
    IBUST_ATTR_UNDERLINE_ERROR   = 4,
} IBustAttrUnderline;
</pre>
<p>
Type of IBustText attribute.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="IBUST-ATTR-UNDERLINE-NONE:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_UNDERLINE_NONE</code></span></p></td>
<td>No underline.
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-UNDERLINE-SINGLE:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_UNDERLINE_SINGLE</code></span></p></td>
<td>Single underline.
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-UNDERLINE-DOUBLE:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_UNDERLINE_DOUBLE</code></span></p></td>
<td>Double underline.
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-UNDERLINE-LOW:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_UNDERLINE_LOW</code></span></p></td>
<td>Low underline ? <code class="literal">FIXME</code>
</td>
</tr>
<tr>
<td><p><a name="IBUST-ATTR-UNDERLINE-ERROR:CAPS"></a><span class="term"><code class="literal">IBUST_ATTR_UNDERLINE_ERROR</code></span></p></td>
<td>Error underline
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IBustAttribute-struct"></a><h3>struct IBustAttribute</h3>
<pre class="programlisting">struct IBustAttribute {
    guint type;
    guint value;
    guint start_index;
    guint end_index;
};
</pre>
<p>
Signify the type, value and scope of the attribute.
The scope starts from <em class="parameter"><code>start_index</code></em> till the <em class="parameter"><code>end_index</code></em>-1.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="IBustAttribute-struct.type"></a>type</code></em>;</span></p></td>
<td>IBustAttributeType</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="IBustAttribute-struct.value"></a>value</code></em>;</span></p></td>
<td>Value for the type.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="IBustAttribute-struct.start-index"></a>start_index</code></em>;</span></p></td>
<td>The starting index, inclusive.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="IBustAttribute-struct.end-index"></a>end_index</code></em>;</span></p></td>
<td>The ending index, exclusive.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IBustAttributeClass"></a><h3>struct IBustAttributeClass</h3>
<pre class="programlisting">struct IBustAttributeClass {
    IBustSerializableClass parent;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attr-background-new"></a><h3>ibust_attr_background_new ()</h3>
<pre class="programlisting"><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     ibust_attr_background_new            (<em class="parameter"><code><span class="type">guint</span> color</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);</pre>
<p>
New an background <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>Color in RGB.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_index</code></em> :</span></p></td>
<td>Where attribute starts.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_index</code></em> :</span></p></td>
<td>Where attribute ends.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attr-foreground-new"></a><h3>ibust_attr_foreground_new ()</h3>
<pre class="programlisting"><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     ibust_attr_foreground_new            (<em class="parameter"><code><span class="type">guint</span> color</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);</pre>
<p>
New an foreground <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>color</code></em> :</span></p></td>
<td>Color in RGB.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_index</code></em> :</span></p></td>
<td>Where attribute starts.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_index</code></em> :</span></p></td>
<td>Where attribute ends.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attr-underline-new"></a><h3>ibust_attr_underline_new ()</h3>
<pre class="programlisting"><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     ibust_attr_underline_new             (<em class="parameter"><code><span class="type">guint</span> underline_type</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);</pre>
<p>
New an underline <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>underline_type</code></em> :</span></p></td>
<td>Type of underline.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_index</code></em> :</span></p></td>
<td>Where attribute starts.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_index</code></em> :</span></p></td>
<td>Where attribute ends.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated <a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attribute-get-attr-type"></a><h3>ibust_attribute_get_attr_type ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               ibust_attribute_get_attr_type        (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);</pre>
<p>
Returns an enum of <a class="link" href="IBustAttribute.html#IBustAttrType"><span class="type">IBustAttrType</span></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An enum of <a class="link" href="IBustAttribute.html#IBustAttrType"><span class="type">IBustAttrType</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attribute-get-end-index"></a><h3>ibust_attribute_get_end_index ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               ibust_attribute_get_end_index        (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);</pre>
<p>
Returns a end unsigned index
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A end unsigned index</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attribute-get-start-index"></a><h3>ibust_attribute_get_start_index ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               ibust_attribute_get_start_index      (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);</pre>
<p>
Returns a start unsigned index
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A start unsigned index</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attribute-get-value"></a><h3>ibust_attribute_get_value ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               ibust_attribute_get_value            (<em class="parameter"><code><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="type">IBustAttribute</span></a> *attr</code></em>);</pre>
<p>
Returns an unsigned int value relative with <a class="link" href="IBustAttribute.html#IBustAttrType"><span class="type">IBustAttrType</span></a>.
If the type is <a class="link" href="IBustAttribute.html#IBUST-ATTR-TYPE-UNDERLINE:CAPS"><code class="literal">IBUST_ATTR_TYPE_UNDERLINE</code></a>, the return value is
<a class="link" href="IBustAttribute.html#IBustAttrUnderline"><span class="type">IBustAttrUnderline</span></a>. If the type is <a class="link" href="IBustAttribute.html#IBUST-ATTR-TYPE-FOREGROUND:CAPS"><code class="literal">IBUST_ATTR_TYPE_FOREGROUND</code></a>,
the return value is the color RGB.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>An unsigned int value relative with <a class="link" href="IBustAttribute.html#IBustAttrType"><span class="type">IBustAttrType</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-attribute-new"></a><h3>ibust_attribute_new ()</h3>
<pre class="programlisting"><a class="link" href="IBustAttribute.html" title="IBustAttribute"><span class="returnvalue">IBustAttribute</span></a> *     ibust_attribute_new                  (<em class="parameter"><code><span class="type">guint</span> type</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> value</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> start_index</code></em>,
                                                         <em class="parameter"><code><span class="type">guint</span> end_index</code></em>);</pre>
<p>
New an IBustAttribute.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>Type of the attribute.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>Value of the attribute.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>start_index</code></em> :</span></p></td>
<td>Where attribute starts.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>end_index</code></em> :</span></p></td>
<td>Where attribute ends.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated IBustAttribute. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="IBustAttribute.see-also"></a><h2>See Also</h2>
<a class="link" href="IBustText.html" title="IBustText"><span class="type">IBustText</span></a>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>